<?php
class Application_Form_Phone extends Application_Form_Product
{
	public function __construct($options = null)
	{
		parent::__construct($options);
		$this->setName('phone');


		
		$typePhoneChoice = array(		'1' => 'Smapt phone',
								 		'2' => 'Cell phone',
										'3' => 'Home phone',
								);
		$type = new Zend_Form_Element_Select('type');
		$type->setLabel('Type:');
		$type->addMultiOptions(array('-1' => 'Choice:')+$typePhoneChoice);
		$type->class = 'type';
		$type->addValidator(new Zend_Validate_Between(array('min' => 1, 'max' => 3)))
		->addErrorMessage('You need to select one value');
		
		
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setAttrib('id', 'submitbutton')
		->setLabel('Add');
		
		$elements = array( $type, $submit );
		$this->addElements($elements);
		
		
		
		
		$this->setDecorators( array( array('ViewScript', array('viewScript' => 'forms/loginform.phtml'))));



	}
}